package com.atguigu.spzx.manager.mapper;

import com.atguigu.spzx.model.entity.product.Category;
import com.atguigu.spzx.model.vo.product.CategoryExcelVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * ClassName: CategoryMapper
 * Package:
 * Description:
 *
 * @Author:xiaohei
 * @Create 2024/5/19 17:34
 * Version 1.0
 */
@Mapper
public interface CategoryMapper {
    //1 根据id条件值进行查询
    List<Category> selectCategoryByParentId(Long id);

    //判断每个分类是否有下一层分类
    int selectCountByParentId(Long id);

    //查询所有分类数据
    List<Category> findAll();

    //批量保存
    void batchInsert(List<CategoryExcelVo> categoryList);
}
